home *** CD-ROM | disk | FTP | other *** search
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- NNNNAAAAMMMMEEEE
- menu - Create and manipulate menu widgets
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- mmmmeeeennnnuuuu _p_a_t_h_N_a_m_e ?_o_p_t_i_o_n_s?
-
- SSSSTTTTAAAANNNNDDDDAAAARRRRDDDD OOOOPPPPTTTTIIIIOOOONNNNSSSS
- aaaaccccttttiiiivvvveeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd bbbbaaaacccckkkkggggrrrroooouuuunnnndddd ddddiiiissssaaaabbbblllleeeeddddFFFFoooorrrreeeeggggrrrroooouuuunnnnddddrrrreeeelllliiiieeeeffff |
- aaaaccccttttiiiivvvveeeeBBBBoooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh bbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh ffffoooonnnnttttttttaaaakkkkeeeeFFFFooooccccuuuussss
- aaaaccccttttiiiivvvveeeeFFFFoooorrrreeeeggggrrrroooouuuunnnndddd ccccuuuurrrrssssoooorrrr ffffoooorrrreeeeggggrrrroooouuuunnnndddd
-
- See the ``options'' manual entry for details on the standard options.
-
- WWWWIIIIDDDDGGGGEEEETTTT----SSSSPPPPEEEECCCCIIIIFFFFIIIICCCC OOOOPPPPTTTTIIIIOOOONNNNSSSS
- Name: ppppoooossssttttCCCCoooommmmmmmmaaaannnndddd
- Class: CCCCoooommmmmmmmaaaannnndddd
- Command-Line Switch:----ppppoooossssttttccccoooommmmmmmmaaaannnndddd
-
- If this option is specified then it provides a Tcl command to
- execute each time the menu is posted. The command is invoked by the
- ppppoooosssstttt widget command before posting the menu.
-
- Name: sssseeeelllleeeeccccttttCCCCoooolllloooorrrr
- Class: BBBBaaaacccckkkkggggrrrroooouuuunnnndddd |
- Command-Line Switch:----sssseeeelllleeeeccccttttccccoooolllloooorrrr |
-
- For menu entries that are check buttons or radio buttons, this
- option specifies the color to display in the indicator when the
- check button or radio button is selected.
-
- Name: tttteeeeaaaarrrrOOOOffffffff |
- Class: TTTTeeeeaaaarrrrOOOOffffffff |
- Command-Line Switch:----tttteeeeaaaarrrrooooffffffff |
-
- This option must have a proper boolean value, which specifies |
- whether or not the menu should include a tear-off entry at the top. |
- If so, it will exist as entry 0 of the menu and the other entries |
- will number starting at 1. The default menu bindings arrange for |
- the menu to be torn off when the tear-off entry is invoked.
-
-
- IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
- The mmmmeeeennnnuuuu command creates a new top-level window (given by the _p_a_t_h_N_a_m_e
- argument) and makes it into a menu widget. Additional options, described
- above, may be specified on the command line or in the option database to
- configure aspects of the menu such as its colors and font. The mmmmeeeennnnuuuu
- command returns its _p_a_t_h_N_a_m_e argument. At the time this command is
- invoked, there must not exist a window named _p_a_t_h_N_a_m_e, but _p_a_t_h_N_a_m_e's
- parent must exist.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- A menu is a widget that displays a collection of one-line entries
- arranged in a column. There exist several different types of entries,
- each with different properties. Entries of different types may be
- combined in a single menu. Menu entries are not the same as entry
- widgets. In fact, menu entries are not even distinct widgets; the entire
- menu is one widget.
-
- Menu entries are displayed with up to three separate fields. The main |
- field is a label in the form of a text string, a bitmap, or an image, |
- controlled by the ----llllaaaabbbbeeeellll, ----bbbbiiiittttmmmmaaaapppp, and ----iiiimmmmaaaaggggeeee options for the entry. If
- the ----aaaacccccccceeeelllleeeerrrraaaattttoooorrrr option is specified for an entry then a second textual
- field is displayed to the right of the label. The accelerator typically
- describes a keystroke sequence that may be typed in the application to
- cause the same result as invoking the menu entry. The third field is an
- _i_n_d_i_c_a_t_o_r. The indicator is present only for checkbutton or radiobutton
- entries. It indicates whether the entry is selected or not, and is
- displayed to the left of the entry's string.
-
- In normal use, an entry becomes active (displays itself differently)
- whenever the mouse pointer is over the entry. If a mouse button is
- released over the entry then the entry is _i_n_v_o_k_e_d. The effect of
- invocation is different for each type of entry; these effects are
- described below in the sections on individual entries.
-
- Entries may be _d_i_s_a_b_l_e_d, which causes their labels and accelerators to be
- displayed with dimmer colors. The default menu bindings will not allow a|
- disabled entry to be activated or invoked. Disabled entries may be re-
- enabled, at which point it becomes possible to activate and invoke them
- again.
-
-
- CCCCOOOOMMMMMMMMAAAANNNNDDDD EEEENNNNTTTTRRRRIIIIEEEESSSS
- The most common kind of menu entry is a command entry, which behaves much
- like a button widget. When a command entry is invoked, a Tcl command is
- executed. The Tcl command is specified with the ----ccccoooommmmmmmmaaaannnndddd option.
-
-
- SSSSEEEEPPPPAAAARRRRAAAATTTTOOOORRRR EEEENNNNTTTTRRRRIIIIEEEESSSS
- A separator is an entry that is displayed as a horizontal dividing line.
- A separator may not be activated or invoked, and it has no behavior other
- than its display appearance.
-
-
- CCCCHHHHEEEECCCCKKKKBBBBUUUUTTTTTTTTOOOONNNN EEEENNNNTTTTRRRRIIIIEEEESSSS
- A checkbutton menu entry behaves much like a checkbutton widget. When it
- is invoked it toggles back and forth between the selected and deselected
- states. When the entry is selected, a particular value is stored in a
- particular global variable (as determined by the ----oooonnnnvvvvaaaalllluuuueeee and ----vvvvaaaarrrriiiiaaaabbbblllleeee
- options for the entry); when the entry is deselected another value
- (determined by the ----ooooffffffffvvvvaaaalllluuuueeee option) is stored in the global variable.
- An indicator box is displayed to the left of the label in a checkbutton
- entry. If the entry is selected then the indicator's center is displayed
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- in the color given by the ----sssseeeelllleeeeccccttttccccoooolllloooorrrr option for the entry; otherwise
- the indicator's center is displayed in the background color for the menu.
- If a ----ccccoooommmmmmmmaaaannnndddd option is specified for a checkbutton entry, then its value
- is evaluated as a Tcl command each time the entry is invoked; this
- happens after toggling the entry's selected state.
-
-
- RRRRAAAADDDDIIIIOOOOBBBBUUUUTTTTTTTTOOOONNNN EEEENNNNTTTTRRRRIIIIEEEESSSS
- A radiobutton menu entry behaves much like a radiobutton widget.
- Radiobutton entries are organized in groups of which only one entry may
- be selected at a time. Whenever a particular entry becomes selected it
- stores a particular value into a particular global variable (as
- determined by the ----vvvvaaaalllluuuueeee and ----vvvvaaaarrrriiiiaaaabbbblllleeee options for the entry). This
- action causes any previously-selected entry in the same group to deselect
- itself. Once an entry has become selected, any change to the entry's
- associated variable will cause the entry to deselect itself. Grouping of
- radiobutton entries is determined by their associated variables: if two
- entries have the same associated variable then they are in the same
- group. An indicator diamond is displayed to the left of the label in
- each radiobutton entry. If the entry is selected then the indicator's
- center is displayed in the color given by the ----sssseeeelllleeeeccccttttccccoooolllloooorrrr option for the
- entry; otherwise the indicator's center is displayed in the background
- color for the menu. If a ----ccccoooommmmmmmmaaaannnndddd option is specified for a radiobutton
- entry, then its value is evaluated as a Tcl command each time the entry
- is invoked; this happens after selecting the entry.
-
-
- CCCCAAAASSSSCCCCAAAADDDDEEEE EEEENNNNTTTTRRRRIIIIEEEESSSS
- A cascade entry is one with an associated menu (determined by the ----mmmmeeeennnnuuuu
- option). Cascade entries allow the construction of cascading menus. The|
- ppppoooossssttttccccaaaassssccccaaaaddddeeee widget command can be used to post and unpost the associated |
- menu just to the right of the cascade entry. The associated menu must be|
- a child of the menu containing the cascade entry (this is needed in order|
- for menu traversal to work correctly).
-
- A cascade entry posts its associated menu by invoking a Tcl command of
- the form
-
- _m_e_n_u ppppoooosssstttt _x _y
-
- where _m_e_n_u is the path name of the associated menu, and _x and _y are the
- root-window coordinates of the upper-right corner of the cascade entry.
- The lower-level menu is unposted by executing a Tcl command with the form
-
- _m_e_n_u uuuunnnnppppoooosssstttt
-
- where _m_e_n_u is the name of the associated menu.
-
- If a ----ccccoooommmmmmmmaaaannnndddd option is specified for a cascade entry then it is
- evaluated as a Tcl command whenever the entry is invoked. |
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- TTTTEEEEAAAARRRR----OOOOFFFFFFFF EEEENNNNTTTTRRRRIIIIEEEESSSS
- A tear-off entry appears at the top of the menu if enabled with the |
- tttteeeeaaaarrrrOOOOffffffff option. It is not like other menu entries in that it cannot be |
- created with the aaaadddddddd widget command and cannot be deleted with the ddddeeeelllleeeetttteeee|
- widget command. When a tear-off entry is created it appears as a dashed |
- line at the top of the menu. Under the default bindings, invoking the |
- tear-off entry causes a torn-off copy to be made of the menu and all of |
- its submenus.
-
-
- WWWWIIIIDDDDGGGGEEEETTTT CCCCOOOOMMMMMMMMAAAANNNNDDDD
- The mmmmeeeennnnuuuu command creates a new Tcl command whose name is _p_a_t_h_N_a_m_e. This
- command may be used to invoke various operations on the widget. It has
- the following general form:
-
- _p_a_t_h_N_a_m_e _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
-
- _O_p_t_i_o_n and the _a_r_gs determine the exact behavior of the command.
-
- Many of the widget commands for a menu take as one argument an indicator
- of which entry of the menu to operate on. These indicators are called
- _i_n_d_e_xes and may be specified in any of the following forms:
-
- _n_u_m_b_e_r Specifies the entry numerically, where 0 corresponds to the
- top-most entry of the menu, 1 to the entry below it, and so
- on.
-
- aaaaccccttttiiiivvvveeee Indicates the entry that is currently active. If no entry is
- active then this form is equivalent to nnnnoooonnnneeee. This form may
- not be abbreviated.
-
- eeeennnndddd Indicates the bottommost entry in the menu. If there are no |
- entries in the menu then this form is equivalent to nnnnoooonnnneeee. |
- This form may not be abbreviated.
-
- llllaaaasssstttt Same as eeeennnndddd.
-
- nnnnoooonnnneeee Indicates ``no entry at all''; this is used most commonly
- with the aaaaccccttttiiiivvvvaaaatttteeee option to deactivate all the entries in the
- menu. In most cases the specification of nnnnoooonnnneeee causes nothing
- to happen in the widget command. This form may not be
- abbreviated.
-
- @@@@_n_u_m_b_e_r In this form, _n_u_m_b_e_r is treated as a y-coordinate in the |
- menu's window; the entry closest to that y-coordinate is |
- used. For example, ``@@@@0000'' indicates the top-most entry in
- the window.
-
- _p_a_t_t_e_r_n If the index doesn't satisfy one of the above forms then this
- form is used. _P_a_t_t_e_r_n is pattern-matched against the label
- of each entry in the menu, in order from the top down, until
- a matching entry is found. The rules of TTTTccccllll____SSSSttttrrrriiiinnnnggggMMMMaaaattttcccchhhh are
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- used.
-
- The following widget commands are possible for menu widgets:
-
- _p_a_t_h_N_a_m_e aaaaccccttttiiiivvvvaaaatttteeee _i_n_d_e_x
- Change the state of the entry indicated by _i_n_d_e_x to aaaaccccttttiiiivvvveeee and
- redisplay it using its active colors. Any previously-active entry
- is deactivated. If _i_n_d_e_x is specified as nnnnoooonnnneeee, or if the specified
- entry is disabled, then the menu ends up with no active entry.
- Returns an empty string.
-
- _p_a_t_h_N_a_m_e aaaadddddddd _t_y_p_e ?_o_p_t_i_o_n _v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
- Add a new entry to the bottom of the menu. The new entry's type is
- given by _t_y_p_e and must be one of ccccaaaassssccccaaaaddddeeee, cccchhhheeeecccckkkkbbbbuuuuttttttttoooonnnn, ccccoooommmmmmmmaaaannnndddd,
- rrrraaaaddddiiiioooobbbbuuuuttttttttoooonnnn, or sssseeeeppppaaaarrrraaaattttoooorrrr, or a unique abbreviation of one of the
- above. If additional arguments are present, they specify any of the
- following options:
-
- ----aaaaccccttttiiiivvvveeeebbbbaaaacccckkkkggggrrrroooouuuunnnndddd _v_a_l_u_e
- Specifies a background color to use for displaying this entry
- when it is active. If this option is specified as an empty
- string (the default), then the aaaaccccttttiiiivvvveeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd option for the
- overall menu is used. If the ttttkkkk____ssssttttrrrriiiiccccttttMMMMoooottttiiiiffff variable has been |
- set to request strict Motif compliance, then this option is |
- ignored and the ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option is used in its place. This
- option is not available for separator or tear-off entries.
-
- ----aaaaccccttttiiiivvvveeeeffffoooorrrreeeeggggrrrroooouuuunnnndddd _v_a_l_u_e
- Specifies a foreground color to use for displaying this entry
- when it is active. If this option is specified as an empty
- string (the default), then the aaaaccccttttiiiivvvveeeeFFFFoooorrrreeeeggggrrrroooouuuunnnndddd option for the
- overall menu is used. This option is not available for
- separator or tear-off entries.
-
- ----aaaacccccccceeeelllleeeerrrraaaattttoooorrrr _v_a_l_u_e
- Specifies a string to display at the right side of the menu
- entry. Normally describes an accelerator keystroke sequence
- that may be typed to invoke the same function as the menu
- entry. This option is not available for separator or tear-off
- entries.
-
- ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd _v_a_l_u_e
- Specifies a background color to use for displaying this entry
- when it is in the normal state (neither active nor disabled).
- If this option is specified as an empty string (the default),
- then the bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option for the overall menu is used. This
- option is not available for separator or tear-off entries.
-
- ----bbbbiiiittttmmmmaaaapppp _v_a_l_u_e
- Specifies a bitmap to display in the menu instead of a textual
- label, in any of the forms accepted by TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp. This
- option overrides the ----llllaaaabbbbeeeellll option but may be reset to an empty
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- string to enable a textual label to be displayed. If a ----iiiimmmmaaaaggggeeee
- option has been specified, it overrides ----bbbbiiiittttmmmmaaaapppp. This option
- is not available for separator or tear-off entries.
-
- ----ccccoooommmmmmmmaaaannnndddd _v_a_l_u_e
- For command, checkbutton, and radiobutton entries, specifies a
- Tcl command to execute when the menu entry is invoked. For
- cascade entries, specifies a Tcl command to execute when the
- entry is activated (i.e. just before its submenu is posted).
- Not available for separator or tear-off entries.
-
- ----ffffoooonnnntttt _v_a_l_u_e
- Specifies the font to use when drawing the label or accelerator
- string in this entry. If this option is specified as an empty
- string (the default) then the ffffoooonnnntttt option for the overall menu
- is used. This option is not available for separator or tear-
- off entries.
-
- ----ffffoooorrrreeeeggggrrrroooouuuunnnndddd _v_a_l_u_e
- Specifies a foreground color to use for displaying this entry
- when it is in the normal state (neither active nor disabled).
- If this option is specified as an empty string (the default),
- then the ffffoooorrrreeeeggggrrrroooouuuunnnndddd option for the overall menu is used. This
- option is not available for separator or tear-off entries.
-
- ----iiiimmmmaaaaggggeeee _v_a_l_u_e
- Specifies an image to display in the menu instead of a text |
- string or bitmap The image must have been created by some |
- previous invocation of iiiimmmmaaaaggggeeee ccccrrrreeeeaaaatttteeee. This option overrides the|
- ----llllaaaabbbbeeeellll and ----bbbbiiiittttmmmmaaaapppp options but may be reset to an empty string |
- to enable a textual or bitmap label to be displayed. This |
- option is not available for separator or tear-off entries.
-
- ----iiiinnnnddddiiiiccccaaaattttoooorrrroooonnnn _v_a_l_u_e
- Available only for checkbutton and radiobutton entries. _V_a_l_u_e |
- is a boolean that determines whether or not the indicator |
- should be displayed.
-
- ----llllaaaabbbbeeeellll _v_a_l_u_e
- Specifies a string to display as an identifying label in the
- menu entry. Not available for separator or tear-off entries.
-
- ----mmmmeeeennnnuuuu _v_a_l_u_e
- Available only for cascade entries. Specifies the path name of
- the submenu associated with this entry. The submenu must be a |
- child of the menu.
-
- ----ooooffffffffvvvvaaaalllluuuueeee _v_a_l_u_e
- Available only for checkbutton entries. Specifies the value to
- store in the entry's associated variable when the entry is
- deselected.
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- ----oooonnnnvvvvaaaalllluuuueeee _v_a_l_u_e
- Available only for checkbutton entries. Specifies the value to
- store in the entry's associated variable when the entry is
- selected.
-
- ----sssseeeelllleeeeccccttttccccoooolllloooorrrr _v_a_l_u_e
- Available only for checkbutton and radiobutton entries. |
- Specifies the color to display in the indicator when the entry |
- is selected. If the value is an empty string (the default) |
- then the sssseeeelllleeeeccccttttCCCCoooolllloooorrrr option for the menu determines the |
- indicator color.
-
- ----sssseeeelllleeeeccccttttiiiimmmmaaaaggggeeee _v_a_l_u_e
- Available only for checkbutton and radiobutton entries. |
- Specifies an image to display in the entry (in place of the |
- ----iiiimmmmaaaaggggeeee option) when it is selected. _V_a_l_u_e is the name of an |
- image, which must have been created by some previous invocation|
- of iiiimmmmaaaaggggeeee ccccrrrreeeeaaaatttteeee. This option is ignored unless the ----iiiimmmmaaaaggggeeee |
- option has been specified.
-
- ----ssssttttaaaatttteeee _v_a_l_u_e
- Specifies one of three states for the entry: nnnnoooorrrrmmmmaaaallll, aaaaccccttttiiiivvvveeee,
- or ddddiiiissssaaaabbbblllleeeedddd. In normal state the entry is displayed using the
- ffffoooorrrreeeeggggrrrroooouuuunnnndddd option for the menu and the bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option from
- the entry or the menu. The active state is typically used when
- the pointer is over the entry. In active state the entry is
- displayed using the aaaaccccttttiiiivvvveeeeFFFFoooorrrreeeeggggrrrroooouuuunnnndddd option for the menu along
- with the aaaaccccttttiiiivvvveeeebbbbaaaacccckkkkggggrrrroooouuuunnnndddd option from the entry. Disabled
- state means that the entry should be insensitive: the default |
- bindings will refuse to activate or invoke the entry. In this
- state the entry is displayed according to the
- ddddiiiissssaaaabbbblllleeeeddddFFFFoooorrrreeeeggggrrrroooouuuunnnndddd option for the menu and the bbbbaaaacccckkkkggggrrrroooouuuunnnndddd
- option from the entry. This option is not available for
- separator entries.
-
- ----uuuunnnnddddeeeerrrrlllliiiinnnneeee _v_a_l_u_e
- Specifies the integer index of a character to underline in the
- entry. This option is also queried by the default bindings and
- used to implement keyboard traversal. 0 corresponds to the
- first character of the text displayed in the entry, 1 to the
- next character, and so on. If a bitmap or image is displayed
- in the entry then this option is ignored. This option is not
- available for separator or tear-off entries.
-
- ----vvvvaaaalllluuuueeee _v_a_l_u_e
- Available only for radiobutton entries. Specifies the value to
- store in the entry's associated variable when the entry is
- selected.
-
- ----vvvvaaaarrrriiiiaaaabbbblllleeee _v_a_l_u_e
- Available only for checkbutton and radiobutton entries.
- Specifies the name of a global value to set when the entry is
-
-
-
- PPPPaaaaggggeeee 7777
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- selected. For checkbutton entries the variable is also set
- when the entry is deselected. For radiobutton entries,
- changing the variable causes the currently-selected entry to
- deselect itself.
-
- The aaaadddddddd widget command returns an empty string.
-
- _p_a_t_h_N_a_m_e ccccggggeeeetttt _o_p_t_i_o_n
- Returns the current value of the configuration option given by |
- _o_p_t_i_o_n. _O_p_t_i_o_n may have any of the values accepted by the mmmmeeeennnnuuuu |
- command.
-
- _p_a_t_h_N_a_m_e ccccoooonnnnffffiiiigggguuuurrrreeee ?_o_p_t_i_o_n? ?_v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
- Query or modify the configuration options of the widget. If no
- _o_p_t_i_o_n is specified, returns a list describing all of the available
- options for _p_a_t_h_N_a_m_e (see TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the
- format of this list). If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then
- the command returns a list describing the one named option (this
- list will be identical to the corresponding sublist of the value
- returned if no _o_p_t_i_o_n is specified). If one or more _o_p_t_i_o_n-_v_a_l_u_e
- pairs are specified, then the command modifies the given widget
- option(s) to have the given value(s); in this case the command
- returns an empty string. _O_p_t_i_o_n may have any of the values accepted
- by the mmmmeeeennnnuuuu command.
-
- _p_a_t_h_N_a_m_e ddddeeeelllleeeetttteeee _i_n_d_e_x_1 ?_i_n_d_e_x_2?
- Delete all of the menu entries between _i_n_d_e_x_1 and _i_n_d_e_x_2 inclusive.
- If _i_n_d_e_x_2 is omitted then it defaults to _i_n_d_e_x_1. Attempts to delete|
- a tear-off menu entry are ignored (instead, you should change the |
- tttteeeeaaaarrrrOOOOffffffff option to remove the tear-off entry).
-
- _p_a_t_h_N_a_m_e eeeennnnttttrrrryyyyccccggggeeeetttt _i_n_d_e_x _o_p_t_i_o_n
- Returns the current value of a configuration option for the entry |
- given by _i_n_d_e_x. _O_p_t_i_o_n may have any of the values accepted by the |
- aaaadddddddd widget command.
-
- _p_a_t_h_N_a_m_e eeeennnnttttrrrryyyyccccoooonnnnffffiiiigggguuuurrrreeee _i_n_d_e_x ?_o_p_t_i_o_n_s?
- This command is similar to the ccccoooonnnnffffiiiigggguuuurrrreeee command, except that it
- applies to the options for an individual entry, whereas ccccoooonnnnffffiiiigggguuuurrrreeee
- applies to the options for the menu as a whole. _O_p_t_i_o_n_s may have
- any of the values accepted by the aaaadddddddd widget command. If _o_p_t_i_o_n_s
- are specified, options are modified as indicated in the command and
- the command returns an empty string. If no _o_p_t_i_o_n_s are specified,
- returns a list describing the current options for entry _i_n_d_e_x (see
- TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the format of this list).
-
- _p_a_t_h_N_a_m_e iiiinnnnddddeeeexxxx _i_n_d_e_x
- Returns the numerical index corresponding to _i_n_d_e_x, or nnnnoooonnnneeee if _i_n_d_e_x
- was specified as nnnnoooonnnneeee.
-
-
-
-
-
-
- PPPPaaaaggggeeee 8888
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- _p_a_t_h_N_a_m_e iiiinnnnsssseeeerrrrtttt _i_n_d_e_x _t_y_p_e ?_o_p_t_i_o_n _v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
- Same as the aaaadddddddd widget command except that it inserts the new entry |
- just before the entry given by _i_n_d_e_x, instead of appending to the |
- end of the menu. The _t_y_p_e, _o_p_t_i_o_n, and _v_a_l_u_e arguments have the |
- same interpretation as for the aaaadddddddd widget command. It is not |
- possible to insert new menu entries before the tear-off entry, if |
- the menu has one.
-
- _p_a_t_h_N_a_m_e iiiinnnnvvvvooookkkkeeee _i_n_d_e_x
- Invoke the action of the menu entry. See the sections on the
- individual entries above for details on what happens. If the menu
- entry is disabled then nothing happens. If the entry has a command
- associated with it then the result of that command is returned as
- the result of the iiiinnnnvvvvooookkkkeeee widget command. Otherwise the result is an
- empty string. Note: invoking a menu entry does not automatically
- unpost the menu; the default bindings normally take care of this
- before invoking the iiiinnnnvvvvooookkkkeeee widget command.
-
- _p_a_t_h_N_a_m_e ppppoooosssstttt _x _y
- Arrange for the menu to be displayed on the screen at the root-
- window coordinates given by _x and _y. These coordinates are adjusted
- if necessary to guarantee that the entire menu is visible on the
- screen. This command normally returns an empty string. If the
- ppppoooossssttttCCCCoooommmmmmmmaaaannnndddd option has been specified, then its value is executed as
- a Tcl script before posting the menu and the result of that script
- is returned as the result of the ppppoooosssstttt widget command. If an error
- returns while executing the command, then the error is returned
- without posting the menu.
-
- _p_a_t_h_N_a_m_e ppppoooossssttttccccaaaassssccccaaaaddddeeee _i_n_d_e_x
- Posts the submenu associated with the cascade entry given by _i_n_d_e_x, |
- and unposts any previously posted submenu. If _i_n_d_e_x doesn't |
- correspond to a cascade entry, or if _p_a_t_h_N_a_m_e isn't posted, the |
- command has no effect except to unpost any currently posted submenu.
-
- _p_a_t_h_N_a_m_e ttttyyyyppppeeee _i_n_d_e_x
- Returns the type of the menu entry given by _i_n_d_e_x. This is the _t_y_p_e|
- argument passed to the aaaadddddddd widget command when the entry was |
- created, such as ccccoooommmmmmmmaaaannnndddd or sssseeeeppppaaaarrrraaaattttoooorrrr, or tttteeeeaaaarrrrooooffffffff for a tear-off |
- entry.
-
- _p_a_t_h_N_a_m_e uuuunnnnppppoooosssstttt
- Unmap the window so that it is no longer displayed. If a lower-
- level cascaded menu is posted, unpost that menu. Returns an empty
- string.
-
- _p_a_t_h_N_a_m_e yyyyppppoooossssiiiittttiiiioooonnnn _i_n_d_e_x
- Returns a decimal string giving the y-coordinate within the menu
- window of the topmost pixel in the entry specified by _i_n_d_e_x.
-
-
-
-
-
-
- PPPPaaaaggggeeee 9999
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- MMMMEEEENNNNUUUU CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNNSSSS
- The default bindings support four different ways of using menus: |
-
- PPPPuuuullllllllddddoooowwwwnnnn MMMMeeeennnnuuuussss
- This is the most common case. You create one menubutton widget for |
- each top-level menu, and typically you arrange a series of |
- menubuttons in a row in a menubar window. You also create the top- |
- level menus and any cascaded submenus, and tie them together with |
- ----mmmmeeeennnnuuuu options in menubuttons and cascade menu entries. The top- |
- level menu must be a child of the menubutton, and each submenu must |
- be a child of the menu that refers to it. Once you have done this, |
- the default bindings will allow users to traverse and invoke the |
- tree of menus via its menubutton; see the mmmmeeeennnnuuuubbbbuuuuttttttttoooonnnn manual entry |
- for details.
-
- PPPPooooppppuuuupppp MMMMeeeennnnuuuussss
- Popup menus typically post in response to a mouse button press or |
- keystroke. You create the popup menus and any cascaded submenus, |
- then you call the ttttkkkk____ppppooooppppuuuupppp procedure at the appropriate time to post|
- the top-level menu.
-
- OOOOppppttttiiiioooonnnn MMMMeeeennnnuuuussss
- An option menu consists of a menubutton with an associated menu that|
- allows you to select one of several values. The current value is |
- displayed in the menubutton and is also stored in a global variable.|
- Use the ttttkkkk____ooooppppttttiiiioooonnnnMMMMeeeennnnuuuu procedure to create option menubuttons and |
- their menus.
-
- TTTToooorrrrnnnn----ooooffffffff MMMMeeeennnnuuuussss
- You create a torn-off menu by invoking the tear-off entry at the top|
- of an existing menu. The default bindings will create a new menu |
- that is a copy of the original menu and leave it permanently posted |
- as a top-level window. The torn-off menu behaves just the same as |
- the original menu.
-
-
- DDDDEEEEFFFFAAAAUUUULLLLTTTT BBBBIIIINNNNDDDDIIIINNNNGGGGSSSS
- Tk automatically creates class bindings for menus that give them the |
- following default behavior:
-
- [1] When the mouse enters a menu, the entry underneath the mouse cursor
- activates; as the mouse moves around the menu, the active entry
- changes to track the mouse.
-
- [2] When the mouse leaves a menu all of the entries in the menu
- deactivate, except in the special case where the mouse moves from a
- menu to a cascaded submenu.
-
- [3] When a button is released over a menu, the active entry (if any) is
- invoked. The menu also unposts unless it is a torn-off menu.
-
-
-
-
-
- PPPPaaaaggggeeee 11110000
-
-
-
-
-
-
- mmmmeeeennnnuuuu((((3333TTTTkkkk)))) mmmmeeeennnnuuuu((((3333TTTTkkkk))))
-
-
-
- [4] The Space and Return keys invoke the active entry and unpost the
- menu.
-
- [5] If any of the entries in a menu have letters underlined with with
- ----uuuunnnnddddeeeerrrrlllliiiinnnneeee option, then pressing one of the underlined letters (or
- its upper-case or lower-case equivalent) invokes that entry and
- unposts the menu.
-
- [6] The Escape key aborts a menu selection in progress without invoking
- any entry. It also unposts the menu unless it is a torn-off menu.
-
- [7] The Up and Down keys activate the next higher or lower entry in the
- menu. When one end of the menu is reached, the active entry wraps
- around to the other end.
-
- [8] The Left key moves to the next menu to the left. If the current
- menu is a cascaded submenu, then the submenu is unposted and the
- current menu entry becomes the cascade entry in the parent. If the
- current menu is a top-level menu posted from a menubutton, then the
- current menubutton is unposted and the next menubutton to the left
- is posted. Otherwise the key has no effect. The left-right order
- of menubuttons is determined by their stacking order: Tk assumes
- that the lowest menubutton (which by default is the first one
- created) is on the left.
-
- [9] The Right key moves to the next menu to the right. If the current
- entry is a cascade entry, then the submenu is posted and the
- current menu entry becomes the first entry in the submenu.
- Otherwise, if the current menu was posted from a menubutton, then
- the current menubutton is unposted and the next menubutton to the
- right is posted.
-
- Disabled menu entries are non-responsive: they don't activate and they
- ignore mouse button presses and releases.
-
- The behavior of menus can be changed by defining new bindings for
- individual widgets or by redefining the class bindings.
-
-
- BBBBUUUUGGGGSSSS
- At present it isn't possible to use the option database to specify values
- for the options to individual entries.
-
-
- KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
- menu, widget
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 11111111
-
-
-
-